// AppWin32Console.cpp : Defines the entry point for the console application.
//
/*
2013-12-22, Honda, Create.

*/

#include "stdafx.h"
#include <stdlib.h>

void ShowMenu()
{
	printf("101-Init		102-...\n");
	printf("103-...			104-...\n");
	printf("105-...			106-...\n");
	printf("0-exit\n");
}

int _tmain(int argc, _TCHAR* argv[])
{
	int iArgv1;
	int iChoose;
	printf("Hello world !\n");
	if (argv[1]!=0) {
		iArgv1=_ttoi(argv[1]);
	}
	else
	{
		iArgv1 = 0;
	}
	while(true)
	{
		if (iArgv1==0)
		{
			ShowMenu();
			printf("Select a number:");
			scanf_s("%3d", &iChoose);
			if (iChoose==0)
				break;
		}
		else
		{
			iChoose = iArgv1;
		}
		switch(iChoose)
		{
			case 101:
			case 102:
			case 103:
			case 104:
			case 105:
			case 106:
				printf("Hello %d function is here.\n", iChoose);
				break;
			default:
				printf("Wrong Choose!.\n", iChoose);
				break;
		}
		getchar();
		getchar();
	}
	return 0;
}



